package com.suncnpap.reader.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.app.util.database.mybatis.Page;
import com.suncnpap.reader.service.ReaderTypeService;
import com.suncnpap.reader.mapper.ReaderTypeMapper;
import com.suncnpap.reader.model.ReaderType;

/** 
 * 说明： 读者类型Service实现类
 * @version
 */
@Service("readerTypeService")
public class ReaderTypeServiceImpl implements ReaderTypeService{

	
	@Autowired
	ReaderTypeMapper readerTypeMapper;
	
	@Override
	public void add(ReaderType obj) {
		// TODO Auto-generated method stub
		readerTypeMapper.add(obj);
	}

	@Override
	public void update(ReaderType obj) {
		// TODO Auto-generated method stub
		readerTypeMapper.edit(obj);
	}

	@Override
	public void deleteById(String strId) {
		// TODO Auto-generated method stub
		readerTypeMapper.deleteById(strId);
		
	}
	@Override
	public void deleteMore(String[] strIds) {
		// TODO Auto-generated method stub
		readerTypeMapper.deleteMore(strIds);
	}

	@Override
	public Page list(Page page) {
		// TODO Auto-generated method stub
		List<ReaderType> list = readerTypeMapper.datalistPage(page);
		page.setDataList(list);
		return page;
	}


	@Override
	public int findCount(Page page) {
		// TODO Auto-generated method stub
		return readerTypeMapper.findCount(page);
	}

	@Override
	public ReaderType findById(String strId) {
		// TODO Auto-generated method stub
		return readerTypeMapper.findById(strId);
	}
	
	@Override
	public ReaderType findByName(String strName, String strSchoolId){
		return readerTypeMapper.findByName(strName, strSchoolId);
	}
}

